package com.ws.universal.tools.wsui.headle;

import android.content.res.Resources;
import android.view.View;

import androidx.annotation.NonNull;

import com.ws.universal.tools.wsui.help.QMUIResHelper;
import com.ws.universal.tools.wsui.skin.IQMUISkinRuleHandler;
import com.ws.universal.tools.wsui.skin.QMUISkinManager;

import org.jetbrains.annotations.NotNull;

public abstract class QMUISkinRuleColorHandler implements IQMUISkinRuleHandler {
    @Override
    public final void handle(@NotNull QMUISkinManager skinManager, @NotNull View view, @NotNull Resources.Theme theme,
                             @NotNull String name, int attr) {
        handle(view, name, QMUIResHelper.getAttrColor(theme, attr));
    }

    protected abstract void handle(@NonNull View view, @NonNull String name, int color);
}
